
import { Component } from 'react'
import { View, Image, Checkbox, WebView } from '@tarojs/components'
import Taro, { getCurrentInstance } from '@tarojs/taro'
import { SpNavBar } from '@/components'

const typetosrc = {
    'yinsi': {src:'https://h5.mimijishi.com/shopadmin-privacy.html',name:'隐私协议'},
    'fuwu': {src:'https://h5.mimijishi.com/subpages/auth/reg-rule?type=member_register', name:'服务协议'}
}
class xieyiWebView extends Component {
    constructor(props) {
        super(props);
    }

    state = {}
    render() {
        const {
            router: {
                params: { type }
            }
        } = getCurrentInstance()
        console.log(type)
        return (
            <>
                <SpNavBar  title={typetosrc[type].name}></SpNavBar>
                <WebView style={{"zIndex":0,position:'absolute' }} src={typetosrc[type].src} />
            </>

        );
    }
}

export default xieyiWebView;
